/ hardmode
/ ========== TOOLS & ARMOR ==========

/ 2-3 realmite tools
group:#rand(2,3):(ID=divinerpg:realmite_sword;ID=divinerpg:realmite_shovel;ID=divinerpg:realmite_pickaxe;ID=divinerpg:realmite_axe;ID=divinerpg:realmite_hoe)@luck=0
/ 1-2 rupee and arlemite tools
group:#rand(1,2):(ID=divinerpg:rupee_rapier;ID=divinerpg:rupee_shovel;ID=divinerpg:rupee_pickaxe;ID=divinerpg:rupee_axe;ID=divinerpg:rupee_hoe)@luck=1
group:#rand(1,2):(ID=divinerpg:arlemite_stabber;ID=divinerpg:arlemite_shovel;ID=divinerpg:arlemite_pickaxe;ID=divinerpg:arlemite_axe;ID=divinerpg:arlemite_hoe)@luck=1
/ realmite armor
group(ID=divinerpg:realmite_helmet;ID=divinerpg:realmite_chestplate;ID=divinerpg:realmite_leggings;ID=divinerpg:realmite_boots)@luck=0
/ 2-3 rupee and arlemite armor
group:#rand(2,3):(ID=divinerpg:rupee_helmet;ID=divinerpg:rupee_chestplate;ID=divinerpg:rupee_leggings;ID=divinerpg:rupee_boots)@luck=1
group:#rand(2,3):(ID=divinerpg:arlemite_helmet;ID=divinerpg:arlemite_chestplate;ID=divinerpg:arlemite_leggings;ID=divinerpg:arlemite_boots)@luck=1
/ 1-2 ethaxium armor
group:#rand(1,2):(ID=abyssalcraft:ethaxiumhelmet;ID=abyssalcraft:ethaxiumplate;ID=abyssalcraft:ethaxiumlegs;ID=abyssalcraft:ethaxiumboots)@luck=1
/ bow and arrows
group(ID=bow;ID=arrow,amount=#rand(16,32))@luck=1

/ ========== BLOCKS ==========

ID=sponge@luck=0
ID=tnt,amount=8@luck=1
ID=obsidian,amount=14@luck=1
ID=enchanting_table@luck=2
ID=end_portal_frame,amount=#rand(2,4)@luck=2
ID=ender_chest,amount=2@luck=0
ID=beacon@luck=2
ID=dropper,amount=8@luck=0
ID=ichunutil:compact_porkchop,amount=4@luck=0

/ chests
type=block,ID=chest,tileEntity=(Items=#chestLootTable("chests/simple_dungeon"))@luck=1
type=block,ID=chest,tileEntity=(Items=#chestLootTable("chests/village_blacksmith"))@luck=1
type=block,ID=chest,tileEntity=(Items=#customChestLootTable({"pools":[{"rolls":{"min":6,"max":12},"entries":[{"type":"item","name":"divinerpg:rupee_ingot","weight":1,"functions":[{"function":"set_count","count":{"min":1,"max":8}}]},{"type":"item","name":"divinerpg:arlemite_ingot","weight":1,"functions":[{"function":"set_count","count":{"min":1,"max":4}}]},{"type":"item","name":"divinerpg:shadow_bar","weight":1,"functions":[{"function":"set_count","count":{"min":1,"max":4}}]},{"type":"item","name":"abyssalcraft:shadowgem","weight":1,"functions":[{"function":"set_count","count":{"min":1,"max":4}}]},{"type":"item","name":"divinerpg:netherite_ingot","weight":1,"functions":[{"function":"set_count","count":{"min":1,"max":4}}]},{"type":"item","name":"lucky:lucky_block_hardmode","weight":1,"functions":[{"function":"set_data","data":0},{"function":"set_count","count":{"min":1,"max":2}}]},{"type":"item","name":"minecraft:golden_apple","weight":1,"functions":[{"function":"set_data","data":0},{"function":"set_count","count":{"min":1,"max":2}}]},{"type":"item","name":"minecraft:golden_apple","weight":1,"functions":[{"function":"set_data","data":1},{"function":"set_count","count":{"min":1,"max":2}}]}]}]}))@luck=2

/ ========= ITEMS ==========

ID=abyssalcraft:abyingot,amount=#rand(5,10)@luck=1
ID=stick@luck=-1
ID=painting,amount=4@luck=0
ID=saddle,amount=2@luck=0
ID=cake@luck=0
ID=rotten_flesh@luck=-1
ID=nether_star@luck=2
ID=red_flower,NBTTag=(display=(Name="$cRomantic Rose"))@luck=-1
ID=divinerpg:advanced_mushroom_stew,amount=#rand(5,7)@luck=1
ID=cqrepoured:feather_golden@luck=2

/ ========== GROUPS ==========

/ bookshelves and books
group(group:3:(ID=bookshelf,amount=#rand(2,4);ID=quark:custom_bookshelf,damage=0,amount=#rand(2,4);ID=quark:custom_bookshelf,damage=1,amount=#rand(2,4);ID=quark:custom_bookshelf,damage=2,amount=#rand(2,4);ID=quark:custom_bookshelf,damage=3,amount=#rand(2,4);ID=quark:custom_bookshelf,damage=4,amount=#rand(2,4));ID=book,amount=#rand(8,16))@luck=0
/ pumpkins and jack o'lanterns
group:3:(ID=pumpkin,amount=#rand(2,4);ID=lit_pumpkin,amount=#rand(2,4);ID=divinerpg:blaze_pumpkin,amount=#rand(2,4);ID=divinerpg:creeper_pumpkin,amount=#rand(2,4);ID=divinerpg:cyclops_pumpkin,amount=#rand(2,4);ID=divinerpg:ender_pumpkin,amount=#rand(2,4);ID=divinerpg:ender_watcher_pumpkin,amount=#rand(2,4);ID=divinerpg:frost_pumpkin,amount=#rand(2,4);ID=divinerpg:ghast_pumpkin,amount=#rand(2,4);ID=divinerpg:glacon_pumpkin,amount=#rand(2,4);ID=divinerpg:hellspider_pumpkin,amount=#rand(2,4);ID=divinerpg:jungle_spider_pumpkin,amount=#rand(2,4);ID=divinerpg:skeleton_pumpkin,amount=#rand(2,4);ID=divinerpg:spider_pumpkin,amount=#rand(2,4);ID=divinerpg:zombie_pumpkin,amount=#rand(2,4))@luck=0
/ golden apples
group(ID=golden_apple,amount=#rand(2,4);ID=golden_apple,amount=#rand(1,2),damage=1)@luck=2
/ buckets
group(ID=bucket,amount=#rand(1,2);ID=water_bucket,amount=#rand(1,2);ID=lava_bucket,amount=#rand(1,2);ID=milk_bucket,amount=#rand(1,2);ID=quark:slime_bucket;ID=forge:bucketfilled,NBTTag=(FluidName="smoldering_tar",Amount=1000);ID=forge:bucketfilled,NBTTag=(FluidName="liquidantimatter",Amount=1000);ID=forge:bucketfilled,NBTTag=(FluidName="liquidcoralium",Amount=1000))@luck=0
/ meat (raw and cooked)
group:1:(group(ID=divinerpg:magic_meat,amount=#rand(8,16);ID=divinerpg:enriched_magic_meat,amount=#rand(4,8));group(ID=divinerpg:raw_empowered_meat,amount=#rand(8,16);ID=divinerpg:empowered_meat,amount=#rand(4,8)))@luck=1
/ vegetable food (carrots, potatoes, pumpkin pie)
group:1:(group(ID=carrot,amount=#rand(8,16);ID=golden_carrot,amount=#rand(4,8));group(ID=potato,amount=#rand(8,16);ID=baked_potato,amount=#rand(4,8);ID=poisonous_potato,amount=#rand(2,4));group(ID=pumpkin_pie,amount=#rand(6,12);ID=divinerpg:hot_pumpkin_pie,amount=#rand(4,8)))@luck=1
/ ender pearls and eyes 
group(ID=ender_pearl,amount=10;ID=ender_eye,amount=5)@luck=2
/ relic swords
group:1:(ID=msmlegacy:relic_aqueous;ID=msmlegacy:relic_candy;ID=msmlegacy:relic_infinity;ID=msmlegacy:relic_keyblade;ID=msmlegacy:relic_master;ID=msmlegacy:relic_molten;ID=msmlegacy:relic_pie)@luck=2
/ potions
ID=#randList(potion,splash_potion),NBTTag=(Potion=#randPotion),amount=#rand(3,6)@luck=1
/ spawn eggs
ID=spawn_egg,NBTTag=(EntityTag=(id=#randSpawnEgg)),amount=#rand(1,3)@luck=2
/ heads
ID=skull,damage=#rand(0,4),amount=#rand(1,3)@luck=0
/ jukebox music discs
group(ID=jukebox;ID=#rand(2256,2267),amount=#rand(1,3))@luck=1
/ brewing
group(ID=ender_pearl,amount=#rand(1,3);ID=blaze_rod,amount=#rand(1,3);ID=ghast_tear,amount=#rand(1,3);ID=gold_nugget,amount=#rand(1,3);ID=nether_wart,amount=#rand(1,3);ID=spider_eye,amount=#rand(1,3);ID=fermented_spider_eye,amount=#rand(1,3);ID=blaze_powder,amount=#rand(1,3);ID=magma_cream,amount=#rand(1,3);ID=ender_eye,amount=#rand(1,3);ID=speckled_melon,amount=#rand(1,3);ID=rabbit_foot,amount=#rand(1,3);type=particle,ID=splashpotion,potion="fire_resistance")@luck=2
/ dimdoors fabric
group(ID=dimdoors:fabric,damage=#rand(0,15),amount=#rand(32,64);type=particle,ID=splashpotion,potion=#randPotion,amount=10)@luck=1
/ rupee, arlemite, shadow bars, shadow gems, netherite with fireworks
group(ID=divinerpg:rupee_ingot,amount=#rand(5,10);ID=divinerpg:arlemite_ingot,amount=#rand(5,10);ID=abyssalcraft:shadowgem,amount=#rand(5,10);ID=divinerpg:netherite_ingot,amount=#rand(5,10);type=entity,ID=fireworks_rocket,NBTTag=(LifeTime=20,FireworksItem=(id=fireworks,Count=1,tag=#randFireworksRocket)),amount=20,posOffset=#circleOffset(0,2))@luck=2
/ quartz
group(ID=stone_slab,damage=7,amount=#rand(4,8);ID=quartz_ore,amount=#rand(16,32);ID=quartz_block,amount=#rand(4,8);ID=quartz_block,damage=1,amount=#rand(4,8);ID=quartz_block,damage=2,amount=#rand(4,8);ID=quartz_stairs,amount=#rand(4,8);ID=quartz,amount=#rand(24,32);type=particle,ID=splashpotion,potion="invisibility")@luck=1
/ fish
group(ID=fishing_rod;ID=349,damage=#rand(0,3),amount=#rand(10,20))@luck=1
/ dishes
group(ID=abyssalcraft:dirtyplate,NBTTag=(display=(Name="WASH THE DISHES!")),amount=4;ID=abyssalcraft:cloth)@luck=-1
/ random jokes
group:1:(ID=clock,NBTTag=(display=(Name="You're wasting your time"));ID=antiqueatlas:empty_antique_atlas,NBTTag=(display=(Name="Atlus"));ID=fish,damage=2,NBTTag=(display=(Name="I'm funny"));ID=fish,damage=3,NBTTag=(display=(Name="Oooooh!")))@luck=-1
/ flowers
group(ID=red_flower,damage=#rand(0,8),amount=64)@luck=0
/ enchantment books
ID=enchanted_book,NBTTag=(StoredEnchantments=#randEnchantment),amount=#rand(7,10)@luck=1
/ random wizardry spell books
group:3:(ID=ebwizardry:spell_book,damage=#rand(1,187);ID=ebwizardry:spell_book,damage=#rand(1,187);ID=ebwizardry:spell_book,damage=#rand(1,187);ID=ebwizardry:spell_book,damage=#rand(1,187);ID=ebwizardry:spell_book,damage=#rand(1,187);ID=ebwizardry:spell_book,damage=#rand(1,187);ID=tfspellpack:twilight_spell_book,damage=#rand(0,31);ID=ancientspellcraft:ancient_spellcraft_spell_book,damage=#rand(0,263);ID=ancientspellcraft:ancient_spellcraft_spell_book,damage=#rand(0,263);ID=ancientspellcraft:ancient_spellcraft_spell_book,damage=#rand(0,263);ID=ancientspellcraft:ancient_spellcraft_spell_book,damage=#rand(0,263);ID=ancientspellcraft:ancient_spellcraft_spell_book,damage=#rand(0,263);ID=ancientspellcraft:ancient_spellcraft_spell_book,damage=#rand(0,263);ID=ancientspellcraft:ancient_spellcraft_spell_book,damage=#rand(0,263);ID=ancientspellcraft:ancient_spellcraft_spell_book,damage=#rand(0,263))@luck=1
/ prismarine
group(ID=prismarine,amount=#rand(4,8);ID=prismarine,damage=1,amount=#rand(4,8);ID=prismarine,damage=2,amount=#rand(4,8);ID=sea_lantern,amount=#rand(4,8);ID=prismarine_shard,amount=#rand(15,30);ID=prismarine_crystals,amount=#rand(10,20);type=particle,ID=splashpotion,potion="invisibility")@luck=1
/ divine shards
group:3:(ID=divinerpg:molten_shards,amount=#rand(2,4);ID=divinerpg:divine_shards,amount=#rand(2,4);ID=divinerpg:jungle_shards,amount=#rand(2,4);ID=divinerpg:terran_shards,amount=#rand(2,4);ID=divinerpg:ice_shards,amount=#rand(2,4);ID=divinerpg:ender_shards,amount=#rand(2,4);ID=divinerpg:corrupted_shards,amount=#rand(2,4))@luck=2

/ ========== ENTITIES ==========

/ lucky mobs
group:1:(type=entity,ID=Pig,NBTTag=(CustomName="$e$lLucky Pig",CustomNameVisible=true);type=entity,ID=Cow,NBTTag=(CustomName="$e$lLucky Cow",CustomNameVisible=true);type=entity,ID=Chicken,NBTTag=(CustomName="$e$lLucky Chicken",CustomNameVisible=true);type=entity,ID=Sheep,NBTTag=(CustomName="$e$lLucky Sheep",CustomNameVisible=true);type=entity,ID=Rabbit,NBTTag=(CustomName="$e$lLucky Rabbit",CustomNameVisible=true);type=entity,ID=Squid,NBTTag=(CustomName="$e$lUnlucky Squid",CustomNameVisible=true))@luck=0
/ colored sheep
type=entity,ID=Sheep,NBTTag=(CustomName="$cM$6r. $eR$aa$2i$bn$3b$5o$dw",CustomNameVisible=true,Color=#rand(0,15)),posOffset=#circleOffset(4),amount=16@luck=1

/ eggs + shadow bars
group(type=entity,ID=egg,NBTTag=(Motion=#randLaunchMotion(0.6,15)),amount=40;type=entity,ID=Item,NBTTag=(Item=(id=divinerpg:shadow_bar,Count=1),Motion=#randLaunchMotion(0.7,18)),amount=12)@luck=2

/ thrown exp bottles
type=entity,ID=xp_bottle,NBTTag=(Motion=#randLaunchMotion),amount=#rand(16,32)@luck=2
/ launched tnt
type=entity,ID=tnt,NBTTag=(Fuse=50b,Motion=#randLaunchMotion),amount=15@luck=-2
/ launched bombs
type=entity,ID=legendgear:bomb,NBTTag=(Motion=#randLaunchMotion),amount=16@luck-2

/ lightning creeper
group(type=difficulty,ID=hard;type=entity,ID=Creeper;type=entity,ID=LightningBolt)@luck=-2
/ giant
group(type=difficulty,ID=hard;type=entity,ID=Giant)@luck=-2
/ wither
group(type=difficulty,ID=hard;type=entity,ID=wither)@chance=0.5@luck=-2
/ advanced cori
group(type=difficulty,ID=hard;type=entity,ID=divinerpg:advanced_cori)@chance=0.5@luck=-2
/ elder guardian
group(type=difficulty,ID=hard;type=entity,ID=Guardian,NBTTag=(Elder=1)))@chance=0.5@luck=-2
/ killer rabbit
group(type=difficulty,ID=hard;type=entity,ID=Rabbit,NBTTag=(RabbitType=99))@luck=-1
/ bob zombie
group(type=difficulty,ID=hard;type=entity,ID=Zombie,NBTTag=(HandItems=[(id=abyssalcraft:ethaxiumsword,Count=1,tag=(ench=#luckySwordEnchantments))],ArmorItems=[(id=abyssalcraft:ethaxiumboots,Count=1,tag=(ench=#luckyBootsEnchantments)),(id=abyssalcraft:ethaxiumlegs,Count=1,tag=(ench=#luckyLeggingsEnchantments)),(id=abyssalcraft:ethaxiumplate,Count=1,tag=(ench=#luckyChestplateEnchantments)),(id=abyssalcraft:ethaxiumhelmet,Count=1,tag=(ench=#luckyHelmetEnchantments))],HandDropChances=[0.5f,0f],ArmorDropChances=[0.3f,0.3f,0.3f,0.3f],CustomName="$9$lBob",CustomNameVisible=true))@luck=-2
/ ghostly horseman skeleton
group(type=difficulty,ID=hard;type=entity,ID=Bat,NBTTag=(Silent=true,ActiveEffects=[(Id=14,Duration=100000,Amplifier=1,ShowParticles=false)],Passengers=[(id=skeleton_horse,Tame=true,Type=4,Passengers=[(id=Skeleton,HandItems=[(id=bow,Count=1,tag=(ench=#luckyBowEnchantments))],ArmorItems=[(id=divinerpg:rupee_boots,Count=1,tag=(ench=#luckyBootsEnchantments)),(id=divinerpg:rupee_leggings,Count=1,tag=(ench=#luckyLeggingsEnchantments)),(id=divinerpg:rupee_chestplate,Count=1,tag=(ench=#luckyChestplateEnchantments)),(id=divinerpg:rupee_helmet,Count=1,tag=(ench=#luckyHelmetEnchantments))],HandDropChances=[0.5f,0f],ArmorDropChances=[0.3f,0.3f,0.3f,0.3f],CustomName="$7$lGhostly Horseman",CustomNameVisible=true)])]))@luck=-2
/ ancient entity
group(type=difficulty,ID=hard;type=entity,ID=divinerpg:ancient_entity)@chance=0.1@luck=-2
/ chemical x
group(type=entity,ID=#randList(Creeper,Enderman,Zombie,Skeleton);type=entity,ID=mutantbeasts:chemical_x,posY=#bPosY+6,NBTTag=(Motion=[0.0,-0.4,0.0]),delay=0.5)@chance=0.5@luck=-2
/ mimic
group(type=difficulty,ID=hard;type=entity,ID=artifacts:mimic)@luck=0

/ dummy
type=entity,ID=testdummy:dummy,NBTTag=(CustomName="T-Pose",CustomNameVisible=true)@luck=0

/ jackoman
type=entity,ID=divinerpg:jack_o_man@luck=1

/ livestock Merchant
type=entity,ID=divinerpg:livestock_merchant@luck=1

/ stacked villager and pigs
type=entity,ID=Pig,NBTTag=(Passengers=[(id=Pig,Passengers=[(id=Pig,Passengers=[(id=Pig,Passengers=[(id=Pig,Passengers=[(id=Pig,Passengers=[(id=Pig,Passengers=[(id=Pig,Passengers=[(id=Villager)])])])])])])])])@luck=0

/ horses
type=entity,ID=#randList(horse,skeleton_horse,zombie_horse),amount=12,posOffset=#circleOffset(4),NBTTag=(Tame=true,OwnerUUID=#pUUID)@luck=1

/colorful creepers
group(type=difficulty,ID=hard;type=entity,ID=#randList(creeper,primitivemobs:support_creeper,primitivemobs:rocket_creeper,primitivemobs:festive_creeper,ancientspellcraft:void_creeper),amount=10,posOffset=#circleOffset(4))@luck=-2

/ llamas
type=entity,ID=llama,amount=8,posOffset=#circleOffset(4),NBTTag=(CustomName=#randList("$5$lLlaura","$5$lLlauretta","$5$lLlavender","$5$lLlinda","$5$lLlisa","$5$lLlouise","$5$lLlucy","$5$lLlydia"),Variant=#rand(0,3),CustomNameVisible=true)@luck=0

/ witch with bats
group(type=difficulty,ID=hard;type=entity,ID=Witch;type=entity,ID=Bat,posY=#bPosY+#rand(0,2),posOffset=#circleOffset(0,1),amount=64)@luck=-1
/ huge slime and magma cube
group:1:(type=entity,ID=Slime,NBTTag=(Size=10);type=entity,ID=magma_cube,NBTTag=(Size=10))@luck=-2

/ pet wolves
group(type=entity,ID=Wolf,amount=#rand(5,10),posOffset=#circleOffset(3),NBTTag=(CollarColor=#rand(0,14),OwnerUUID=#pUUID,Sitting=1);type=particle,ID="heart",size=(2,0,2),particleAmount=20)@luck=1
/ pet cats
group(type=entity,ID=ocelot,amount=#rand(5,10),posOffset=#circleOffset(3),NBTTag=(CatType=#rand(0,3),OwnerUUID=#pUUID,Sitting=1);type=particle,ID="heart",size=(2,0,2),particleAmount=20)@luck=1
/ pet rabbits
group(type=entity,ID=Rabbit,amount=#rand(5,10),posOffset=#circleOffset(3),NBTTag=(RabbitType=#rand(0,5),OwnerUUID=#pUUID,Sitting=1);type=particle,ID="heart",size=(2,0,2),particleAmount=20)@luck=1

/ villain villagers
type=entity,ID=Villager,NBTTag=(Offers=(Recipes=[(buy=(id=abyssalcraft:ethaxiumingot,Count=4),sell=(id=abyssalcraft:ethaxiumsword,Count=1,tag=(ench=#luckySwordEnchantments,display=(Name="$4$lVillain's Sword"))),maxUses=1)]),CustomName="$4$lVillain Villager",CustomNameVisible=true)@luck=1
type=entity,ID=Villager,NBTTag=(Offers=(Recipes=[(buy=(id=abyssalcraft:ethaxiumingot,Count=10),sell=(id=abyssalcraft:ethaxiumhelmet,Count=1,tag=(ench=#luckyHelmetEnchantments,display=(Name="$4$lVillain's Helmet"))),maxUses=1),(buy=(id=abyssalcraft:ethaxiumingot,Count=16),sell=(id=abyssalcraft:ethaxiumplate,Count=1,tag=(ench=#luckyChestplateEnchantments,display=(Name="$4$lVillain's Chestplate"))),maxUses=1),(buy=(id=abyssalcraft:ethaxiumingot,Count=14),sell=(id=abyssalcraft:ethaxiumlegs,Count=1,tag=(ench=#luckyLeggingsEnchantments,display=(Name="$4$lVillain's Leggings"))),maxUses=1),(buy=(id=abyssalcraft:ethaxiumingot,Count=8),sell=(id=abyssalcraft:ethaxiumboots,Count=1,tag=(ench=#luckyBootsEnchantments,display=(Name="$4$lVillain's Boots"))),maxUses=1)]),CustomName="$4$lVillain Villager",CustomNameVisible=true)@luck=1
type=entity,ID=Villager,NBTTag=(Offers=(Recipes=[(buy=(id=abyssalcraft:ethaxiumingot,Count=2),sell=(id=abyssalcraft:ethaxiumshovel,Count=1,tag=(ench=#luckyToolEnchantments,display=(Name="$4$lVillain's Shovel"))),maxUses=1),(buy=(id=abyssalcraft:ethaxiumingot,Count=6),sell=(id=abyssalcraft:ethaxiumpickaxe,Count=1,tag=(ench=#luckyToolEnchantments,display=(Name="$4$lVillain's Pickaxe"))),maxUses=1),(buy=(id=abyssalcraft:ethaxiumingot,Count=6),sell=(id=abyssalcraft:ethaxiumaxe,Count=1,tag=(ench=#luckyAxeEnchantments,display=(Name="$4$lVillain's Axe"))),maxUses=1),(buy=(id=abyssalcraft:ethaxiumingot,Count=4),sell=(id=abyssalcraft:ethaxiumhoe,Count=1,tag=(ench=#luckyToolEnchantments,display=(Name="$4$lVillain's Hoe"))),maxUses=1)]),CustomName="$4$lVillain Villager",CustomNameVisible=true)@luck=1

/ falling blocks (rupee, arlemite, netherite, bloodgem, realmite)
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=falling_block,posY=#bPosY+7,NBTTag=(Block=divinerpg:rupee_block);type=particle,ID=magicCrit,size=(1,2,1),particleAmount=500;type=sound,ID=entity.experience_orb.pickup)@luck=0
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=falling_block,posY=#bPosY+7,NBTTag=(Block=divinerpg:arlemite_block);type=particle,ID=happyVillager,size=(1,2,1),particleAmount=500;type=sound,ID=entity.villager.yes)@luck=0
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=falling_block,posY=#bPosY+7,NBTTag=(Block=divinerpg:netherite_block);type=entity,ID=LightningBolt;type=particle,ID=reddust,size=(1,2,1),particleAmount=500)@luck=1
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=falling_block,posY=#bPosY+7,NBTTag=(Block=divinerpg:bloodgem_block);type=particle,ID=heart,size=(1,2,1),particleAmount=500;type=sound,ID=entity.cat.purr)@luck=0
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=falling_block,posY=#bPosY+7,NBTTag=(Block=divinerpg:realmite_block);type=particle,ID=dripLava,size=(1,2,1),particleAmount=500;type=sound,ID=block.lava.pop)@luck=0

/ skybeam + sword pedestal with random sword
group(type=fill,ID=air,size=(1,10,1);type=entity,ID=falling_block,posY=#bPosY+7,NBTTag=(Block=legendgear:skybeam_block);type=entity,ID=falling_block,posY=#bPosY+9,NBTTag=(Block=legendgear:sword_pedestal,Data=8,TileEntityData=(Item=(id=#randList(divinerpg:divine_sword,divinerpg:blue_divine_sword,divinerpg:gray_divine_sword,divinerpg:green_divine_sword,divinerpg:red_divine_sword,divinerpg:yellow_divine_sword),Count=1,Damage=0)));type=particle,ID=endRod,size=(1,3,1),particleAmount=400;type=sound,ID=ebwizardry:spell.font_of_vitality)@luck=2

/ colorful pole
group(type=fill,ID=air,size=(1,51,1);group(NBTTag=(Block=concrete,Data=14),posY=#bPosY+5;NBTTag=(Block=concrete,Data=1),posY=#bPosY+10;NBTTag=(Block=concrete,Data=4),posY=#bPosY+15;NBTTag=(Block=concrete,Data=5),posY=#bPosY+20;NBTTag=(Block=concrete,Data=3),posY=#bPosY+25;NBTTag=(Block=concrete,Data=11),posY=#bPosY+30;NBTTag=(Block=concrete,Data=10),posY=#bPosY+35;NBTTag=(Block=concrete,Data=2),posY=#bPosY+40;NBTTag=(Block=concrete,Data=6),posY=#bPosY+45),type=entity,ID=falling_block;type=entity,ID=falling_block,NBTTag=(Block=legendgear:infused_starstone_block),posY=#bPosY+50;type=entity,ID=LightningBolt,posY=#bPosY+10,delay=5.3)@luck=2

/ tnt pole
group(type=fill,ID=air,size=(1,51,1);type=entity,ID=falling_block,NBTTag=(Block=redstone_block),posY=#bPosY+5;group(posY=#bPosY+10;posY=#bPosY+15;posY=#bPosY+20;posY=#bPosY+25;posY=#bPosY+30;posY=#bPosY+35;posY=#bPosY+40;posY=#bPosY+45;posY=#bPosY+50),type=entity,ID=falling_block,NBTTag=(Block=tnt))@luck=2

/ baby player
type=entity,ID=armor_stand,NBTTag=(Small=true,NoBasePlate=true,ShowArms=true,HandItems=[(id=divinerpg:rupee_pickaxe,Count=1)],ArmorItems=[(id=leather_boots,Count=1,tag=(display=(color=#rand(0,16777215)))),(id=leather_leggings,Count=1,tag=(display=(color=#rand(0,16777215)))),(id=leather_chestplate,Count=1,tag=(display=(color=#rand(0,16777215)))),(id=skull,Damage=3,Count=1,tag=(SkullOwner=#pName))],Rotation=[#pYaw+180f,0f],CustomName="Baby #pName",CustomNameVisible=true)@luck=0

/ smoke bomb + shadow mobs
group(type=effect,ID=blindness,range=4,duration=6;type=particle,ID=largesmoke,size=(3.0,2.0,3.0),particleAmount=800;type=particle,ID=smoke,size=(3.0,2.0,3.0),particleAmount=800;type=sound,ID=ebwizardry:entity.smoke_bomb.smoke;type=entity,ID=abyssalcraft:shadowcreature,amount=#rand(6,10),posOffset=#circleOffset(2,4);type=entity,ID=abyssalcraft:shadowmonster,amount=#rand(4,7),posOffset=#circleOffset(3,5);type=entity,ID=abyssalcraft:shadowbeast,amount=#rand(2,4),posOffset=#circleOffset(4,6))@chance=0.5@luck=-2

/ ==== Monster Apocalyple ====
/ difficulty, time, potion effects
group(type=difficulty,ID=hard;type=time,ID=18750;type=effect,ID=slowness,duration=15,amplifier=4;type=effect,ID=blindness,duration=15;type=effect,ID=potioncore:weight,duration=15,amplifier=1; \
/ miner, caveclops, pumpkin spider, enthralled dramcryx & grue, jungle mobs
group:1:(type=entity,ID=divinerpg:miner,amount=#rand(15,30);type=entity,ID=divinerpg:caveclops,amount=#rand(8,20);type=entity,ID=divinerpg:pumpkin_spider,amount=#rand(12,25);group(type=entity,ID=divinerpg:enthralled_dramcryx,amount=#rand(12,25);type=entity,ID=divinerpg:the_grue,amount=#rand(5,10));group(type=entity,ID=divinerpg:jungle_spider,amount=#rand(8,20);type=entity,ID=divinerpg:jungle_bat,amount=#rand(5,10);type=entity,ID=divinerpg:jungle_dramcryx,amount=#rand(5,10)); \
/ all
group(type=entity,ID=divinerpg:miner,amount=#rand(15,30);type=entity,ID=divinerpg:caveclops,amount=#rand(8,20);group(type=entity,ID=divinerpg:pumpkin_spider,amount=#rand(12,25);type=entity,ID=divinerpg:enthralled_dramcryx,amount=#rand(12,25);type=entity,ID=divinerpg:the_grue,amount=#rand(5,10);type=entity,ID=divinerpg:jungle_spider,amount=#rand(8,20);type=entity,ID=divinerpg:jungle_bat,amount=#rand(5,10);type=entity,ID=divinerpg:jungle_dramcryx,amount=#rand(5,10)))),posOffset=#circleOffset(8,10))@luck=-2

/ ========== STRUCTURES ==========

/ aquarium
group(type=structure,ID=aquarium;type=entity,ID=divinerpg:shark,amount=2,posOffset=#circleOffset(0,2);type=entity,ID=abyssaldepths:fish,amount=10,posOffset=#circleOffset(0,3);type=entity,ID=abyssaldepths:sea_serpent)@luck=0

/ traps
type=structure,ID=anvil_trap,pos=#pPos,rotation=#pDirect@luck=-2
type=structure,ID=lava_trap,pos=#pPos,rotation=#pDirect@luck=-2
type=structure,ID=water_trap,pos=#pPos@luck=-2  
type=structure,ID=pit_trap,pos=#pPos@luck=-2

/ lucky fort and temple
type=structure,ID=lucky_fort,pos=#pPos@luck=2
type=structure,ID=lucky_temple,pos=#pPos@chance=0.4@luck=2

/ bedrock problem
type=structure,ID=bedrock_problem,rotation=#pDirect@luck=-1

/ explosion
group(type=difficulty,ID=hard;type=explosion,radius=6)@luck=-2

/ magic library
group(type=structure,ID=magic_library;type=message,ID="You're a wizard #pName")@luck=2

/ wishing wells
group(type=structure,ID=wishing_well;type=message,ID="A wishing well? Maybe you should throw in a coin...";type=command,ID="/give #pName gold_nugget 1 0 {display:{Name:\"$6Coin\"}}";type=block,ID=lucky:lucky_block_hardmode,posY=#bPosY-3,NBTTag=(Drops=["group(type=message,ID=\"$bYour wish came true!\";type=block,ID=air,posY='#'bPosY+3;type=block,ID=beacon,posY='#'bPosY+2;type=entity,ID=fireworks_rocket,NBTTag=(LifeTime=20,FireworksItem=(id=fireworks,Count=1,tag='#'randFireworksRocket)),amount=20,posY='#'bPosY+3,posOffset='#'circleOffset(2);ID=divinerpg:arlemite_ingot,amount=#rand(12,18),posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=divinerpg:shadow_bar,amount=#rand(12,18),posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=abyssalcraft:shadowgem,amount=#rand(12,18),posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=divinerpg:netherite_ingot,amount=#rand(12,18),posY='#'bPosY+10,posOffset='#'circleOffset(2))"]))@luck=2
group(type=structure,ID=wishing_well;type=message,ID="A wishing well? Maybe you should throw in a coin...";type=command,ID="/give #pName gold_nugget 1 0 {display:{Name:\"$6Coin\"}}";type=block,ID=lucky:lucky_block_hardmode,posY=#bPosY-3,NBTTag=(Drops=["group(type=message,ID=\"$eYour wish came true! (If you like potatoes)\";type=block,ID=air,posY='#'bPosY+3;type=block,ID=beacon,posY='#'bPosY+2;ID=potato,amount=128,posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=baked_potato,amount=64,posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=poisonous_potato,amount=32,posY='#'bPosY+10,posOffset='#'circleOffset(2))"]))@luck=1
group(type=structure,ID=wishing_well;type=message,ID="A wishing well? Maybe you should throw in a coin...";type=command,ID="/give #pName gold_nugget 1 0 {display:{Name:\"$6Coin\"}}";type=block,ID=lucky:lucky_block_hardmode,posY=#bPosY-3,NBTTag=(Drops=["group(type=message,ID=\"$4Your death wish came true!\";type=block,ID=air,posY='#'bPosY+3;type=block,ID=beacon,posY='#'bPosY+2;type=entity,ID=tnt,NBTTag=(Fuse=50b,Motion='#'randLaunchMotion),posY='#'bPosY+7,amount=20)"]))@luck=-2


/ giant lucky blocks
type=structure,ID=giant_lucky_block_good,rotation=#pDirect@luck=2
type=structure,ID=giant_lucky_block_bad,rotation=#pDirect@luck=-2

/ ========== ENCHANTED + LUCKY ITEMS ==========

/ villain sword
ID=abyssalcraft:ethaxiumsword,NBTTag=(ench=#luckySwordEnchantments,display=(Name="$4$lVillain's Sword"))@luck=2
/ villain tools
group:#rand(1,2):(ID=abyssalcraft:ethaxiumshovel,NBTTag=(ench=#luckyToolEnchantments,display=(Name="$4$lVillain's Shovel"));ID=abyssalcraft:ethaxiumpickaxe,NBTTag=(ench=#luckyToolEnchantments,display=(Name="$4$lVillain's Pickaxe"));ID=abyssalcraft:ethaxiumaxe,NBTTag=(ench=#luckyAxeEnchantments,display=(Name="$4$lVillain's Axe"));ID=abyssalcraft:ethaxiumhoe,NBTTag=(ench=#luckyToolEnchantments,display=(Name="$4$lVillain's Hoe")))@luck=2
/ villain armor
group:#rand(1,2):(ID=abyssalcraft:ethaxiumhelmet,NBTTag=(ench=#luckyHelmetEnchantments,display=(Name="$4$lVillain's Helmet"));ID=abyssalcraft:ethaxiumplate,NBTTag=(ench=#luckyChestplateEnchantments,display=(Name="$4$lVillain's Chestplate"));ID=abyssalcraft:ethaxiumlegs,NBTTag=(ench=#luckyLeggingsEnchantments,display=(Name="$4$lVillain's Leggings"));ID=abyssalcraft:ethaxiumboots,NBTTag=(ench=#luckyBootsEnchantments,display=(Name="$4$lVillain's Boots")))@luck=2

/ lucky items
type=item,ID=lucky:lucky_sword@chance=1@luck=2
type=item,ID=lucky:lucky_bow@chance=1@luck=2
type=item,ID=lucky:lucky_potion,NBTTag=(Luck=#randList(100,-100)),amount=#rand(5,10)@chance=1@luck=2
group(type=item,ID=lucky:lucky_sword;type=item,ID=lucky:lucky_bow;type=item,ID=lucky:lucky_potion,NBTTag=(Luck=#randList(100,-100)),amount=#rand(5,10);type=entity,ID=fireworks_rocket,NBTTag=(LifeTime=20,FireworksItem=(id=fireworks,Count=1,tag=#randFireworksRocket)),amount=20,posOffset=#circleOffset(0,2))@luck=2
